package com.bsi.app;



import com.bsi.app.srvc.SrvcFactory;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public abstract class BaseTabActivity extends TabActivity {
	private static final String TAG="activityInfo";
	protected SrvcFactory srvcFactory=SrvcFactory.getInstance(this);
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		AppManager.getAppManager().addActivity(this);

		Log.i(TAG, this.getLocalClassName()+ " : onCreate");
	}

	@Override
	protected void onStart() {
		Log.i(TAG, this.getLocalClassName()+ " : onStart");
		super.onStart();
	}

	@Override
	protected void onRestart() {
		Log.i(TAG, this.getLocalClassName()+ " : onRestart");
		super.onRestart();
	}
	@Override
	protected void onResume() {
		Log.i(TAG, this.getLocalClassName()+ " : onResume");
		initView();
		initData();
		super.onResume();
	}

	@Override
	protected void onPause() {
		Log.i(TAG, this.getLocalClassName()+ " : onPause");
		super.onPause();
	}

	protected abstract void initData();
	protected abstract void initView();
	@Override
	protected void onStop() {
		Log.i(TAG, this.getLocalClassName()+ " : onStop");
		super.onStop();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		Log.i(TAG, this.getLocalClassName()+ " : onDestory");
	}
	
	protected void startActivity(Class clazz){
		  Intent intent=new Intent(this, clazz);
		  this.startActivity(intent);
	}

}
